<style lang="scss" scoped>
.catgary{
    width: 200px;
    .item,
    .itemActive{
        width: 100%;
        height: 40px;
        line-height: 40px;
        text-align: center;
        user-select: none;
        cursor: pointer;
        background-color: #ccc;
    }
    .itemActive{
        background-color: #eee;
    }
}
</style>
<template lang="">
    <div class="catgary">
        <div :class="{
            item: index != 0,
            itemActive: index == 0
        }" @click="index = 0">
            袖袖
        </div>
        <div :class="{
            item: index != 1,
            itemActive: index == 1
        }" @click="index = 1">
            帽帽
        </div>
        <div :class="{
            item: index != 2,
            itemActive: index == 2
        }" @click="index = 2">
            鞋鞋
        </div>
        <div :class="{
            item: index != 3,
            itemActive: index == 3
        }" @click="index = 3">
            包包
        </div>
        <div :class="{
            item: index != 4,
            itemActive: index == 4
        }" @click="index = 4">
            裙裙
        </div>
        <div :class="{
            item: index != 5,
            itemActive: index == 5
        }" @click="index = 5">
            裤裤
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            index: 0
        }
    },
}
</script>